Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Terminal Manager #12726

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

kenneth-marut-work
Copy link
Contributor

What it does

Relevant to #12673

This is PR adds the package terminal-manager, which was built for our downstream IDE. It is heavily inspired by VSCode's split-panel terminal view + tree, but not an exact copy. The terminal manager is separate widget that supplements the existing terminals inside Theia but is not meant as a replacement (at the moment). The terminal-manager's purpose is to serve as a place to maintain and organize terminals to improve a user's way of working.

I'm hoping to hand off this feature to anyone that's interested as I will not have the bandwidth to bring this feature up to parity with VSCode. This hopefully will serve as a good jumping off point for some interesting terminal view improvements to Theia. Happy to answer any questions otherwise :)

Description

terminal-manager

How to test

  • Build and run this branch
  • Start Theia and run the command "Open Terminal Manager"
    • The terminal manager should appear in the bottom panel and look like this:

image

  • On start you are given defaults of one page, one group, and one terminal, you can add additional pages by hovering over the treewidget and clicking the icons on the tree nodes
  • Use the new keybinding alt+q to maximize and minimize the terminal panel. This keybinding is meant to serve as a convenient way of switching between the normal "editor" view and a fullscreen "terminal" view. (you can also use the new toolbar item to maximize/minimize)

image

  • Try adding groups, pages, terminals to get something like this:

image

  • Right click on tree nodes and try renaming nodes

  • Click on different nodes, corresponding terminals should flash when their node is selected (and vice versa)

    • Pages should automatically update when their respective nodes are selected (and renamed)
  • Try deleting groups, pages, terminals from the tree widget (you won't be allowed to delete the last page/group/terminal for its respective parent, does this behavior make sense?)

  • Try showing and hiding the tree widget with this icon:

image

  • If you want the tree widget to appear on the left/right, set this preference;

image

  • The terminal manager's layout and state is stored in local storage
    • layouts should be stored with their corresponding workspace so a layout created in Workspace A will be saved whenever workspace A is opened, new workspaces/windows should start with a fresh terminal manager

How to test

Review checklist

Reminder for reviewers

@kenneth-marut-work kenneth-marut-work added the terminal issues related to the terminal label Jul 18, 2023
@tsmaeder
Copy link
Contributor

@kenneth-marut-work the title says "draft", but it's a regular non-draft PR. What's the truth?

@kenneth-marut-work
Copy link
Contributor Author

kenneth-marut-work commented Jul 26, 2023

@kenneth-marut-work the title says "draft", but it's a regular non-draft PR. What's the truth?

I'm happy to remove the "draft" label from the PR as I'm not actively developing it anymore. I originally kept it in draft state since it will need some work to be brought up to feature parity with VSCode.

Ah, I see. thanks @colin-grant-work

@colin-grant-work colin-grant-work marked this pull request as draft July 26, 2023 14:36
@DavenportEmma
Copy link

This is great! What would need to be done to bring this feature up to scratch?

@kenneth-marut-work
Copy link
Contributor Author

This is great! What would need to be done to bring this feature up to scratch?

I think there are quite a lot of nice-to-have features missing (menu items/actions that you can perform on individual terminals, shell & task detection etc.). But I think most importantly the TerminalManager is not integrated with Theia's Terminal API (e.g. using the "New Terminal" command will not open a terminal inside the TerminalManager). Follow-up MRs could be made to add additional features, but I could imagine the following things would need to be done in the short term:

  • Make TerminalManagerFrontendViewContribution extend TerminalFrontendContribution and rebind as needed
  • Implement a preference similar to VSCode's terminal.integrated.tabs.enabled preference that would allow a user to switch between the tabbed view vs. the tree view (though I believe in VSCode the terminals actually switch between a dropdown view and a tree view, not tabs).
  • Depending on user's preference above, delegate Terminal actions to default Terminal or TerminalManager
  • Fill in the gaps :)

@JonasHelming
Copy link
Contributor

@conordavenport Are you interested in picking up this work?

@JonasHelming
Copy link
Contributor

@conordavenport Could you give an update on this please? Did you grap the code so that we can close this PR? Do you plan to do a contribution here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal issues related to the terminal
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

5 participants